console.log('-------------------')
console.log('test6')

function* foo() {
    yield 1;
    yield 2;
    yield 3;
    yield 4;
    yield 5;
    yield 6
}

for(let v of foo()){
    console.log(v)
}
// 1 2 3 4 5 6